\(\int \frac {\cos (c+d x) \cot ^5(c+d x)}{(a+a \sin (c+d x))^2} \, dx\) [641]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 82 \[ \int \frac {\cos (c+d x) \cot ^5(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {5 \text {arctanh}(\cos (c+d x))}{8 a^2 d}+\frac {2 \cot ^3(c+d x)}{3 a^2 d}-\frac {3 \cot (c+d x) \csc (c+d x)}{8 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d} \]

[Out]

5/8*arctanh(cos(d*x+c))/a^2/d+2/3*cot(d*x+c)^3/a^2/d-3/8*cot(d*x+c)*csc(d*x+c)/a^2/d-1/4*cot(d*x+c)*csc(d*x+c)
^3/a^2/d

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2954, 2952, 2691, 3855, 2687, 30, 3853} \[ \int \frac {\cos (c+d x) \cot ^5(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {5 \text {arctanh}(\cos (c+d x))}{8 a^2 d}+\frac {2 \cot ^3(c+d x)}{3 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d}-\frac {3 \cot (c+d x) \csc (c+d x)}{8 a^2 d} \]

[In]

Int[(Cos[c + d*x]*Cot[c + d*x]^5)/(a + a*Sin[c + d*x])^2,x]

[Out]

(5*ArcTanh[Cos[c + d*x]])/(8*a^2*d) + (2*Cot[c + d*x]^3)/(3*a^2*d) - (3*Cot[c + d*x]*Csc[c + d*x])/(8*a^2*d) -
 (Cot[c + d*x]*Csc[c + d*x]^3)/(4*a^2*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2691

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a*Sec[e +
 f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[b^2*((n - 1)/(m + n - 1)), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2952

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 2954

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Dist[(a/g)^(2*m), Int[(g*Cos[e + f*x])^(2*m + p)*((d*Sin[e + f*x])^n/(a - b*Sin[e +
f*x])^m), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \cot ^2(c+d x) \csc ^3(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4} \\ & = \frac {\int \left (a^2 \cot ^2(c+d x) \csc (c+d x)-2 a^2 \cot ^2(c+d x) \csc ^2(c+d x)+a^2 \cot ^2(c+d x) \csc ^3(c+d x)\right ) \, dx}{a^4} \\ & = \frac {\int \cot ^2(c+d x) \csc (c+d x) \, dx}{a^2}+\frac {\int \cot ^2(c+d x) \csc ^3(c+d x) \, dx}{a^2}-\frac {2 \int \cot ^2(c+d x) \csc ^2(c+d x) \, dx}{a^2} \\ & = -\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d}-\frac {\int \csc ^3(c+d x) \, dx}{4 a^2}-\frac {\int \csc (c+d x) \, dx}{2 a^2}-\frac {2 \text {Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{a^2 d} \\ & = \frac {\text {arctanh}(\cos (c+d x))}{2 a^2 d}+\frac {2 \cot ^3(c+d x)}{3 a^2 d}-\frac {3 \cot (c+d x) \csc (c+d x)}{8 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d}-\frac {\int \csc (c+d x) \, dx}{8 a^2} \\ & = \frac {5 \text {arctanh}(\cos (c+d x))}{8 a^2 d}+\frac {2 \cot ^3(c+d x)}{3 a^2 d}-\frac {3 \cot (c+d x) \csc (c+d x)}{8 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.61 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.41 \[ \int \frac {\cos (c+d x) \cot ^5(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\left (\csc \left (\frac {1}{2} (c+d x)\right )+\sec \left (\frac {1}{2} (c+d x)\right )\right )^4 \left (-33 \cos (c+d x)+60 \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sin ^4(c+d x)+\cos (3 (c+d x)) (9+16 \sin (c+d x))+24 \sin (2 (c+d x))\right )}{1536 a^2 d (1+\sin (c+d x))^2} \]

[In]

Integrate[(Cos[c + d*x]*Cot[c + d*x]^5)/(a + a*Sin[c + d*x])^2,x]

[Out]

((Csc[(c + d*x)/2] + Sec[(c + d*x)/2])^4*(-33*Cos[c + d*x] + 60*(Log[Cos[(c + d*x)/2]] - Log[Sin[(c + d*x)/2]]
)*Sin[c + d*x]^4 + Cos[3*(c + d*x)]*(9 + 16*Sin[c + d*x]) + 24*Sin[2*(c + d*x)]))/(1536*a^2*d*(1 + Sin[c + d*x
])^2)

Maple [A] (verified)

Time = 0.37 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.49

method result size
parallelrisch \(\frac {-3 \left (\cot ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+16 \left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-16 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-24 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+24 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-48 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+48 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-120 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{192 d \,a^{2}}\) \(122\)
derivativedivides \(\frac {\frac {\left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {4 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {4}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-10 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}-\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {4}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}}{16 d \,a^{2}}\) \(124\)
default \(\frac {\frac {\left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {4 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {4}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-10 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}-\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {4}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}}{16 d \,a^{2}}\) \(124\)
risch \(\frac {-48 i {\mathrm e}^{6 i \left (d x +c \right )}+9 \,{\mathrm e}^{7 i \left (d x +c \right )}+48 i {\mathrm e}^{4 i \left (d x +c \right )}-33 \,{\mathrm e}^{5 i \left (d x +c \right )}-16 i {\mathrm e}^{2 i \left (d x +c \right )}-33 \,{\mathrm e}^{3 i \left (d x +c \right )}+16 i+9 \,{\mathrm e}^{i \left (d x +c \right )}}{12 a^{2} d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d \,a^{2}}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d \,a^{2}}\) \(146\)
norman \(\frac {-\frac {1}{64 a d}+\frac {7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{192 d a}+\frac {\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}{16 d a}-\frac {17 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{48 d a}+\frac {17 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{48 d a}-\frac {\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )}{16 d a}-\frac {7 \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{192 d a}+\frac {\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )}{64 d a}-\frac {15 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d a}-\frac {55 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d a}-\frac {185 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{96 d a}-\frac {125 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d a}-\frac {205 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{48 d a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d \,a^{2}}\) \(298\)

[In]

int(cos(d*x+c)^6*csc(d*x+c)^5/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/192*(-3*cot(1/2*d*x+1/2*c)^4+3*tan(1/2*d*x+1/2*c)^4+16*cot(1/2*d*x+1/2*c)^3-16*tan(1/2*d*x+1/2*c)^3-24*cot(1
/2*d*x+1/2*c)^2+24*tan(1/2*d*x+1/2*c)^2-48*cot(1/2*d*x+1/2*c)+48*tan(1/2*d*x+1/2*c)-120*ln(tan(1/2*d*x+1/2*c))
)/d/a^2

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.68 \[ \int \frac {\cos (c+d x) \cot ^5(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {32 \, \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) + 18 \, \cos \left (d x + c\right )^{3} + 15 \, {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 15 \, {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 30 \, \cos \left (d x + c\right )}{48 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} - 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d\right )}} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^5/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/48*(32*cos(d*x + c)^3*sin(d*x + c) + 18*cos(d*x + c)^3 + 15*(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1)*log(1/2*
cos(d*x + c) + 1/2) - 15*(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1)*log(-1/2*cos(d*x + c) + 1/2) - 30*cos(d*x + c
))/(a^2*d*cos(d*x + c)^4 - 2*a^2*d*cos(d*x + c)^2 + a^2*d)

Sympy [F(-1)]

Timed out. \[ \int \frac {\cos (c+d x) \cot ^5(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**6*csc(d*x+c)**5/(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 194 vs. \(2 (74) = 148\).

Time = 0.23 (sec) , antiderivative size = 194, normalized size of antiderivative = 2.37 \[ \int \frac {\cos (c+d x) \cot ^5(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\frac {\frac {48 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {24 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {16 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}}{a^{2}} - \frac {120 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} + \frac {{\left (\frac {16 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {24 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {48 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - 3\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{4}}{a^{2} \sin \left (d x + c\right )^{4}}}{192 \, d} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^5/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/192*((48*sin(d*x + c)/(cos(d*x + c) + 1) + 24*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 16*sin(d*x + c)^3/(cos(d
*x + c) + 1)^3 + 3*sin(d*x + c)^4/(cos(d*x + c) + 1)^4)/a^2 - 120*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^2 + (
16*sin(d*x + c)/(cos(d*x + c) + 1) - 24*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 48*sin(d*x + c)^3/(cos(d*x + c)
+ 1)^3 - 3)*(cos(d*x + c) + 1)^4/(a^2*sin(d*x + c)^4))/d

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 158 vs. \(2 (74) = 148\).

Time = 0.36 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.93 \[ \int \frac {\cos (c+d x) \cot ^5(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {120 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {250 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 48 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 16 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}} - \frac {3 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 16 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 48 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{8}}}{192 \, d} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^5/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/192*(120*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 - (250*tan(1/2*d*x + 1/2*c)^4 - 48*tan(1/2*d*x + 1/2*c)^3 - 24*
tan(1/2*d*x + 1/2*c)^2 + 16*tan(1/2*d*x + 1/2*c) - 3)/(a^2*tan(1/2*d*x + 1/2*c)^4) - (3*a^6*tan(1/2*d*x + 1/2*
c)^4 - 16*a^6*tan(1/2*d*x + 1/2*c)^3 + 24*a^6*tan(1/2*d*x + 1/2*c)^2 + 48*a^6*tan(1/2*d*x + 1/2*c))/a^8)/d

Mupad [B] (verification not implemented)

Time = 9.37 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.84 \[ \int \frac {\cos (c+d x) \cot ^5(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12\,a^2\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,a^2\,d}-\frac {5\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,a^2\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^2\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {1}{4}\right )}{16\,a^2\,d} \]

[In]

int(cos(c + d*x)^6/(sin(c + d*x)^5*(a + a*sin(c + d*x))^2),x)

[Out]

tan(c/2 + (d*x)/2)^2/(8*a^2*d) - tan(c/2 + (d*x)/2)^3/(12*a^2*d) + tan(c/2 + (d*x)/2)^4/(64*a^2*d) - (5*log(ta
n(c/2 + (d*x)/2)))/(8*a^2*d) + tan(c/2 + (d*x)/2)/(4*a^2*d) - (cot(c/2 + (d*x)/2)^4*(2*tan(c/2 + (d*x)/2)^2 -
(4*tan(c/2 + (d*x)/2))/3 + 4*tan(c/2 + (d*x)/2)^3 + 1/4))/(16*a^2*d)